//
//  ContentView.swift
//  About Me
//
//  Created by Alfred Jobs on 2022/12/7.
//

import SwiftUI

struct ContentView: View {
    @State var index = 3
    
    var body: some View {
        TabView(selection: $index, content: {
            HomeView()
                .tabItem {
                    Label("Home", systemImage: "person")
                }.tag(1)
            StoryView()
                .tabItem {
                    Label("Story", systemImage: "book")
                }.tag(2)
            FavoritesView()
                .tabItem {
                    Label("Favorites", systemImage: "star")
                }.tag(3)
            FunFactsView()
                .tabItem {
                    Label("Fun Facts", systemImage: "hand.thumbsup")
                }.tag(4)
        })
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
